﻿/***********************************************************************
 * <copyright file="IPermissionInSiteRepository.cs" company="B/S JSC">
 * -->    Copyright (C) statement. All right reserved
 * </copyright>
 * 
 * Created:   Hoang Bich Son 
 * Email:    sonhb@newman.vn
 * Website:
 * Create Date: Saturday, March 29, 2014
 * Usage: 
 * 
 * RevisionHistory: 
 * Date         Author               Description 
 * 
 * ************************************************************************/

using System.Collections.Generic;
using DxMvcApplication.SecurityServiceReference;

namespace DxMvcApplication.Repositories.Core.Security
{
    /// <summary>
    /// IPermissionInSiteRepository interface
    /// </summary>
    public interface IPermissionInSiteRepository : IRepository<PermissionInSiteDto>
    {

        /// <summary>
        /// Grants the permission.
        /// </summary>
        /// <param name="permissionId">The permission identifier.</param>
        /// <param name="siteIds">The site ids.</param>
        /// <returns></returns>
        string AssignToSite(int permissionId, List<PermissionInSiteDto> siteIds);

        /// <summary>
        /// Gets the permission in site by permission identifier.
        /// </summary>
        /// <param name="permissionId">The permission identifier.</param>
        /// <returns></returns>
        List<PermissionInSiteDto> GetPermissionInSiteByPermissionId(int permissionId);

        /// <summary>
        /// Gets the permission in site by site identifier.
        /// </summary>
        /// <param name="roleId">The role identifier.</param>
        /// <returns></returns>
        List<PermissionInSiteDto> GetPermissionInSiteBySiteId(int roleId);
    }
}